
    <script type="text/javascript">
    	tinyMCE.init({
        	// General options
        	mode : "textareas",
        	theme : "advanced",
        	plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager",

        	// Theme options
        	theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
        	theme_advanced_buttons2 : "cut,copy,paste,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,forecolor,backcolor",
        	theme_advanced_toolbar_location : "top",
        	theme_advanced_toolbar_align : "left",
        	theme_advanced_statusbar_location : "bottom",
        	theme_advanced_resizing : true,

        	// Example content CSS (should be your site CSS)
        	//content_css : "css/example.css",

        	// Drop lists for link/image/media/template dialogs
        	template_external_list_url : "js/template_list.js",
        	external_link_list_url : "js/link_list.js",
        	external_image_list_url : "js/image_list.js",
        	media_external_list_url : "js/media_list.js",

        	// Replace values for the template plugin
        	template_replace_values : {
        		username : "Some User",
        		staffid : "991234"
        	}
        });

        $().ready(function() {
            $("#ticketForm").validate({
                errorLabelContainer: $("#ticketForm div.error")
            });
        });
    </script>
    <!-- /TinyMCE -->

    <style type="text/css">
        .ticketForm fieldset p.error label { color: red; }
        form.ticketForm label.error {
            display: block;
            margin-left: 1em;
            width: auto;
        }
        div.error {
            background-color: #eee;
            border: 1px dashed red;
            margin: 5px;
            padding: 10px;
        }
        #invalid {
            color: red;
            font-size: 14px;
        }
    </style>

<?php
if (!$detail) {
?>
<p id="invalid" align="center">Invalid link</p>
<?php
} else {
?>
<form id="ticketForm" name="ticketForm" action="<?php echo $html->url('/ticket/ticketaction/'.$detail['ticketId']); ?>" method="post">

    <table width="100%" border="0" cellpadding="20">

        <tr>
            <td colspan="2"><div class="error"></div></td>
        </tr>

        <tr>
            <td id="input_label" width="30%">&nbsp;Action Taken</td>
            <td id="input_box"> <p align="left"><?php echo $detail['action_taken']?></p></td>
        </tr>

        <tr>
            <td id="input_label">&nbsp;Recommendation</td>
            <td id="input_box"> <p align="left"><?php echo $detail['recommendation']?></p></td>
        </tr>

        <tr>
            <td id="input_label" valign="top"><font color="red"><b>*</b></font>&nbsp;Remarks</td>
            <td id="input_box"> <p align="left">
                <textarea id="summary" name="data[feedback][remarks]" style="width: 100%;" title="Remarks is a required field" class=""></textarea>
            </td>
        </tr>

        <tr>
            <td id="input_label" valign="top"><font color="red"><b>*</b></font>&nbsp;Is the action and recommendation satisfies your concern?</td>
            <td id="input_box"> <p align="left" valign="middle">
                <input type="radio" name="data[feedback][confirm]" value="yes" title="Confirmation field is required" class="{required:true}"><label>Yes</label>&nbsp;
                <input type="radio" name="data[feedback][confirm]" value="no" title="Confirmation field is required" class="{required:true}"><label>No</label>
            </td>
        </tr>

        <tr>
            <td id="spacer" colspan="2">&nbsp;</td>
        </tr>

        <tr>
            <td>&nbsp;</td>
            <td>
                <input type="submit" value="Submit" style="width: 100px; height: 30px;" <?php echo ($detail)?"":"disabled"; ?> />

            </td>
        </tr>

    </table>

    <input type="hidden" name="data[feedback][ticketdetailId]" value="<?php echo $detail['ticketDetailId']?>" />
</form>
<?php
}
?>

<script type="text/javascript">
<!--
function checkmsg()
{
    var msg = '<?php echo $msg; ?>';
    if (msg) alert(msg);
}

checkmsg();
//-->
</script>